#include "SypEngine.h"

#ifdef CHECKMEM
#include "mmgr.h"
#endif
namespace Syp
{

	Effect* Effect::createEffect(const String& effectName, const String& effectDescription, PInt effectQuality)
	{
		return (new Effect(effectName,effectDescription,effectQuality));
	}


	Effect::Effect(const String& effectName, const String& effectDescription, PInt effectQuality):name(effectName),description(effectDescription),quality(effectQuality)
	{

	};

	const String& Effect::getDescription()
	{
		return description;
	}

	void Effect::addPass(const String& name)
	{
		Pass* p = PassRegistry::getRegistry().getEntry(name);
		assert(p && "Invalid Pass String passed into Effect::addPass");

		passes.push_back( p );
	}

	String& Effect::getName()
	{
		return name;
	}

	PInt Effect::getNumPasses()
	{
		return static_cast<PInt>(passes.size());
	}

	Pass* Effect::getPass(PInt p)
	{
		return passes[p];
	}

	PInt Effect::getQuality()
	{
		return quality;
	}
}
